package com.jy.api.util.builder;

import java.util.function.Supplier;

public class TArgumentsBuilder<K, V> extends MapBuilder<TArgumentsBuilder<K, V>, K, V> {
    public TArgumentsBuilder<K, V> putIf(boolean condition, K key, Supplier<V> supplier) {
        if (condition) super.put(key, supplier.get());
        return this._this();
    }

    public TArgumentsBuilder<K, V> put(K key, Supplier<V> supplier) {
        return this.putIf(true, key, supplier);
    }
}
